export class OptionsUtil {
  async queryExchange() {
    return new Promise((resolve) => {
      setTimeout(() => {
        const data = JSON.parse('[\n' +
          '    {\n' +
          '      "value": "010",\n' +
          '      "label": "深交所"\n' +
          '    },\n' +
          '    {\n' +
          '      "value": "011",\n' +
          '      "label": "上交所"\n' +
          '    },\n' +
          '    {\n' +
          '      "value": "023",\n' +
          '      "label": "港交所"\n' +
          '    }\n' +
          '  ]')
        resolve(data)
      }, 1000)
    })
  }

  queryCity() {
    return JSON.parse('[\n' +
      '    {\n' +
      '      "value": "beijing",\n' +
      '      "label": "北京市",\n' +
      '      "children": [\n' +
      '        {\n' +
      '          "value": "beijing",\n' +
      '          "label": "北京市",\n' +
      '          "children": [\n' +
      '            {\n' +
      '              "value": "daxing",\n' +
      '              "label": "大兴"\n' +
      '            },\n' +
      '            {\n' +
      '              "value": "changping",\n' +
      '              "label": "昌平"\n' +
      '            },\n' +
      '            {\n' +
      '              "value": "changping",\n' +
      '              "label": "通州"\n' +
      '            }\n' +
      '          ]\n' +
      '        }\n' +
      '      ]\n' +
      '    },\n' +
      '    {\n' +
      '      "value": "hebei",\n' +
      '      "label": "河北省",\n' +
      '      "children": [\n' +
      '        {\n' +
      '          "value": "shijiazhuang",\n' +
      '          "label": "石家庄",\n' +
      '          "children": [\n' +
      '            {\n' +
      '              "value": "xinhuaqu",\n' +
      '              "label": "新华区"\n' +
      '            },\n' +
      '            {\n' +
      '              "value": "changanqu",\n' +
      '              "label": "长安区"\n' +
      '            },\n' +
      '            {\n' +
      '              "value": "qiaoxiqu",\n' +
      '              "label": "桥西区"\n' +
      '            }\n' +
      '          ]\n' +
      '        }\n' +
      '      ]\n' +
      '    }\n' +
      '  ]')
  }
}

export default new

OptionsUtil()
